home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / AIncludes / SCSiEqu.a < prev    next >
Encoding:
Text File  |  1989-10-13  |  5.6 KB  |  227 lines  |  [TEXT/MPS ]

  1. ; Version: 2.48
  2. ; Created: Thursday, September 7, 1989 at 4:56:43 PM
  3. ;
  4. ; File: SCSIEqu.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1986-1988
  8. ; All Rights Reserved
  9. ;
  10. ; Equates for SCSI boot, mgr routines
  11. ; SCSI Traps
  12. ;________________________________________________________________________________
  13.  
  14.  
  15. ; misc SCSI driver equates
  16.  
  17. scMacID         EQU         $80                     ; SCSI ID for Macintosh Plus (bit 7)
  18. SCSIDrvrs        EQU         $B2E                    ; (word) bitmap for loaded SCSI drivers
  19.  
  20. ; SCSI error codes
  21.  
  22. scCommErr        EQU         2                        ; communications error (operation timeout)
  23. scArbNBErr        EQU         3                        ; arbitration timeout waiting for not BSY
  24. scBadparmsErr    EQU         4                        ; bad parameter or TIB opcode
  25. scPhaseErr        EQU         5                        ; SCSI bus not in correct phase for attempted operation
  26. scCompareErr    EQU         6                        ; data compare error
  27. scMgrBusyErr    EQU         7                        ; SCSI Manager busy with another operation
  28. ; when SCSIGet was called
  29.  
  30. scSequenceErr    EQU         8                        ; attempted operation is out of sequence;
  31. ; e.g., calling SCSISelect before doing
  32. ; SCSIGet. Incorrectly written drivers
  33. ; can cause this error.
  34.  
  35. scBusTOErr        EQU         9                        ; CPU bus timeout when attempting read or
  36. ; write in pseudo-DMA mode -- indicates
  37. ; that the data wasn't ready within the
  38. ; 'bus timeout' period. (Mac SE & Mac II only)
  39.  
  40. scComplPhaseErr   EQU        10                        ; SCSI bus wasn't in Status phase when
  41. ; SCSIComplete was called -- the SCSI
  42. ; Manager may have had to throw away data
  43. ; (or write 'filler' bytes) in order to
  44. ; reach the Status phase. Indicates that
  45. ; the driver didn't handle SCSI bus phase
  46. ; changes correctly.
  47.  
  48.  
  49. ; misc SCSI driver equates
  50.  
  51. scDefaultID     EQU         7                        ; default CPU SCSI id
  52.  
  53. ;---------------------------------------------------
  54. ;
  55. ; the information pertaining to the read/write
  56. ; command block interpreter.
  57. ;
  58. ; SCSI command block equates.
  59. ;
  60.  
  61. scOpcode        EQU         0                        ; offsets into command "line" for data xfer
  62. scParam1        EQU         2
  63. scParam2        EQU         6
  64. scSize            EQU         10                        ; size of a command line
  65.  
  66.  
  67. scInc            EQU         1                        ; xfer with address increment
  68. scNoInc         EQU         2                        ; xfer without address increment
  69. scAdd            EQU         3                        ; add count to address
  70. scMove            EQU         4                        ; MOVE data from addr1 to addr2
  71. scLoop            EQU         5                        ; decrement loop counter and branch
  72. scNop            EQU         6                        ; do very little
  73. scStop            EQU         7                        ; then stop doing even that
  74. scComp            EQU         8                        ; compare bytes with address increment
  75.  
  76. ;
  77. ; The layout of block 0 of a bootable SCSI device.
  78. ;
  79.  
  80. sbSigWord        EQU         $4552                    ; block 0 validator
  81. sbSig            EQU         0                        ; signature word
  82. sbBlkSize        EQU         2                        ; block size of device
  83. sbBlkCount        EQU         4                        ; # blocks on device
  84. sbDevType        EQU         8                        ; device type code
  85. sbDevID         EQU         10
  86. sbData            EQU         12                        ; start of data section
  87. sbDrvCount        EQU         16                        ; # drivers following
  88. sbDrvrs         EQU         18                        ; start of driver descriptors
  89.  
  90. ; Driver descriptors
  91.  
  92. ddBlock         EQU         0                        ; physical block of driver
  93. ddSize            EQU         4                        ; block count of driver
  94. ddType            EQU         6                        ; Processor type of driver
  95. ddLen            EQU         8
  96. sbMac            EQU         1                        ; Macintosh driver type
  97.  
  98. ;
  99. ; Partition Descriptors
  100. ;
  101. pdSigWord        EQU         $5453                    ; block 1 validator
  102. pmSig            EQU         0                        ; unique value for map entry blk
  103. pmSigPad        EQU         2                        ; currently unused
  104. pmMapBlkCnt     EQU         4                        ; # of blks in partition map
  105. pmPyPartStart    EQU         8                        ; first physical block of partition
  106. pmPartBlkCnt    EQU         12                        ; number of blocks in partition
  107. pmPartName        EQU         16                        ; ASCII partition name
  108. pmParType        EQU         48                        ; ASCII partition type
  109. pmLgDataStart    EQU         80                        ; log. # of partition's 1st data blk
  110. pmDataCnt        EQU         84                        ; # of blks in partition's data area
  111. pmPartStatus    EQU         88                        ; bit field for partition status
  112. pmLgBootStart    EQU         92                        ; logical blk of partition's boot code
  113. pmBootSize        EQU         96                        ; number of bytes in boot code
  114. pmBootAddr        EQU         100                     ; memory load address of boot code
  115. pmBootAddr2     EQU         104                     ; currently unused
  116. pmBootEntry     EQU         108                     ; entry point of boot code
  117. pmBootEntry2    EQU         112                     ; currently unused
  118. pmBootCksum     EQU         116                     ; checksum of boot code
  119. pmProcessor     EQU         120                     ; ASCII for the processor type
  120. pmPad            EQU         124                     ; 512 bytes long, currently unused
  121.  
  122.  
  123. hfsID            EQU         'TFS1'                    ; The HFS filesystem ID
  124.  
  125. ;Routine Selectors
  126.  
  127. scsiReset        EQU         0
  128. scsiGet         EQU         1
  129. scsiSelect        EQU         2
  130. scsiCmd         EQU         3
  131. scsiComplete    EQU         4
  132. scsiRead        EQU         5
  133. scsiWrite        EQU         6
  134. scsiRBlind        EQU         8
  135. scsiWBlind        EQU         9
  136. scsiStat        EQU         10
  137. scsiSelAtn        EQU         11
  138. scsiMsgIn        EQU         12
  139. scsiMsgOut        EQU         13
  140. numSelectors    EQU         14
  141.  
  142.  
  143.                 MACRO
  144.                 _SCSIReset
  145.                 MOVE        #scsiReset,-(sp)
  146.                 _SCSIDispatch
  147.                 ENDM
  148.  
  149.                 MACRO
  150.                 _SCSIGet
  151.                 MOVE        #scsiGet,-(sp)
  152.                 _SCSIDispatch
  153.                 ENDM
  154.  
  155.                 MACRO
  156.                 _SCSISelect
  157.                 MOVE        #scsiSelect,-(sp)
  158.                 _SCSIDispatch
  159.                 ENDM
  160.  
  161.                 MACRO
  162.                 _SCSICmd
  163.                 MOVE        #scsiCmd,-(sp)
  164.                 _SCSIDispatch
  165.                 ENDM
  166.  
  167.                 MACRO
  168.                 _SCSIComplete
  169.                 MOVE        #scsiComplete,-(sp)
  170.                 _SCSIDispatch
  171.                 ENDM
  172.  
  173.                 MACRO
  174.                 _SCSIRead
  175.                 MOVE        #scsiRead,-(sp)
  176.                 _SCSIDispatch
  177.                 ENDM
  178.  
  179.                 MACRO
  180.                 _SCSIWrite
  181.                 MOVE        #scsiWrite,-(sp)
  182.                 _SCSIDispatch
  183.                 ENDM
  184.  
  185.                 MACRO
  186.                 _SCSIInstall
  187.                 MOVE        #scsiInstall,-(sp)
  188.                 _SCSIDispatch
  189.                 ENDM
  190.  
  191.                 MACRO
  192.                 _SCSIRBlind
  193.                 MOVE        #scsiRBlind,-(sp)
  194.                 _SCSIDispatch
  195.                 ENDM
  196.  
  197.                 MACRO
  198.                 _SCSIWBlind
  199.                 MOVE        #scsiWBlind,-(sp)
  200.                 _SCSIDispatch
  201.                 ENDM
  202.  
  203.                 MACRO
  204.                 _SCSIStat
  205.                 MOVE        #scsiStat,-(sp)
  206.                 _SCSIDispatch
  207.                 ENDM
  208.  
  209.  
  210.                 MACRO
  211.                 _scsiSelAtn
  212.                 MOVE        #scsiSelAtn,-(sp)
  213.                 _SCSIDispatch
  214.                 ENDM
  215.  
  216.                 MACRO
  217.                 _SCSIMsgIn
  218.                 MOVE        #scsiMsgIn,-(sp)
  219.                 _SCSIDispatch
  220.                 ENDM
  221.  
  222.                 MACRO
  223.                 _SCSIMsgOut
  224.                 MOVE        #scsiMsgOut,-(sp)
  225.                 _SCSIDispatch
  226.                 ENDM
  227.